package com.zr.controller;

import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.zr.service.MangerSelectService;
/**
 * 获取管理员信息控制
 * @author xl
 * 2016年5月24日上午11:08:56
 */
public class GetAllMangerController extends HttpServlet{
	MangerSelectService sss=new MangerSelectService();
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String page = req.getParameter("page");
		String rows = req.getParameter("rows");
		int startpage=(Integer.parseInt(page)-1)*Integer.parseInt(rows);
		resp.setCharacterEncoding("utf8");
		PrintWriter pw=resp.getWriter();
		pw.write(sss.getAllStudent(startpage, Integer.parseInt(rows)).toString());
	}
}
